import time
from concurrent import futures
from concurrent.futures import ThreadPoolExecutor
def mysleeps(num):
    import time
    time.sleep(100 - num)
    print(f'我结束运行{num}，我休息了{100-num}秒钟')
    return num


with futures.ThreadPoolExecutor(max_workers=100) as executor:#多线程
    dict={}
    for i in range(100):
        fun= executor.submit(mysleeps,i)
        dict[fun]=i
        print(dict)





